Skip to content

Comments

fix: use portable shebang in native messaging host wrapper#45

Open
ppetru wants to merge 1 commit intonicobailon:mainfrom
ppetru:fix/portable-shebang-nixos
Open

fix: use portable shebang in native messaging host wrapper#45
ppetru wants to merge 1 commit intonicobailon:mainfrom
ppetru:fix/portable-shebang-nixos

Conversation

@ppetru
Copy link

@ppetru ppetru commented Feb 23, 2026

On NixOS (and other non-FHS Linux distributions like Guix), /bin/bash doesn't exist — all binaries live in the Nix store.

This causes Chrome's native messaging to fail with:


LaunchProcess: failed to execvp:
/home/user/.local/share/surf-cli/host-wrapper.sh

The fix changes the generated shebang from #!/bin/bash to #!/usr/bin/env bash, which is portable across all Unix-like systems.

On NixOS (and other non-FHS Linux distributions like Guix), /bin/bash
doesn't exist — all binaries live in the Nix store.

This causes Chrome's native messaging to fail with:

    LaunchProcess: failed to execvp:
    /home/user/.local/share/surf-cli/host-wrapper.sh

The fix changes the generated shebang from #!/bin/bash to
#!/usr/bin/env bash, which is portable across all Unix-like systems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant